#ifndef __UNIT_H_
#define __UNIT_H_

#include <list>
#include <boost/shared_ptr.hpp>
#include "Decision.h"

enum {
	UNIT_DEAD,
	UNIT_MERGED,
	UNIT_ACTIVE,
	UNIT_INVALID
};

struct UnitBase
{
	virtual DecisionBasePtr makeDecision(const MapProvider &mapProvider) = 0;
	virtual void actionFail(int idx) = 0;
	virtual void decisionSucceed(int count) = 0;

	bool active() { return status == UNIT_ACTIVE; }

	unsigned status;
	int actoin
	
	//	current position
	int x;
	int y;
};

typedef boost::shared_ptr<UnitBase> UnitBasePtr;
typedef std::list<UnitBasePtr> UnitBaseList;


#endif